home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / dev / c / ctags.lha / ctags-3.0.3 / general.h < prev    next >
C/C++ Source or Header  |  1999-02-17  |  4KB  |  155 lines

  1. /*****************************************************************************
  2. *   $Id: general.h,v 7.2 1998/12/12 05:53:45 darren Exp $
  3. *
  4. *   Copyright (c) 1998, Darren Hiebert
  5. *
  6. *   This source code is released for free distribution under the terms of the
  7. *   GNU General Public License.
  8. *
  9. *   Provides the general (non-ctags-specific) environment assumed by all.
  10. *****************************************************************************/
  11. #ifndef _GENERAL_H
  12. #define _GENERAL_H
  13.  
  14. /*============================================================================
  15. =   Include files
  16. ============================================================================*/
  17. #ifdef HAVE_CONFIG_H
  18. # include <config.h>
  19. #endif
  20.  
  21. /*============================================================================
  22. =   Macros
  23. ============================================================================*/
  24.  
  25. #if defined(__STDC__) || defined(MSDOS) || defined(WIN32) || defined(OS2)
  26. # define ENABLE_PROTOTYPES
  27. #endif
  28.  
  29. /*  Determine whether to use prototypes or simple declarations.
  30.  */
  31. #ifndef __ARGS
  32. # ifdef ENABLE_PROTOTYPES
  33. #  define __ARGS(x) x
  34. # else
  35. #  define __ARGS(x) ()
  36. # endif
  37. #endif
  38.  
  39. /*  This is a helpful internal feature of later versions (> 2.7) of GCC
  40.  *  to prevent warnings about unused variables.
  41.  */
  42. #if __GNUC__ > 2  ||  (__GNUC__ == 2  &&  __GNUC_MINOR__ >= 7)
  43. # define __unused__    __attribute__((unused))
  44. #else
  45. # define __unused__
  46. #endif
  47.  
  48. /*  MS-DOS doesn't allow manipulation of standard error, so we send it to
  49.  *  stdout instead.
  50.  */
  51. #if defined(MSDOS) || defined(WIN32)
  52. # define errout    stdout
  53. #else
  54. # define errout    stderr
  55. #endif
  56.  
  57. #if defined(__STDC__) || defined(MSDOS) || defined(WIN32) || defined(OS2)
  58. # define ENABLE_STDARG
  59. #endif
  60.  
  61. #if defined(MSDOS) || defined(WIN32)
  62. # define HAVE_DOS_H
  63. # define HAVE_IO_H
  64. # define HAVE_STDLIB_H
  65. # define HAVE_TIME_H
  66. # define HAVE_CLOCK
  67. # define HAVE_CHSIZE
  68. # define HAVE_FGETPOS
  69. # define HAVE_STRERROR
  70. # define HAVE_FINDNEXT
  71. # ifdef __BORLANDC__
  72. #  define HAVE_DIR_H
  73. #  define HAVE_DIRENT_H
  74. #  define HAVE_FINDFIRST
  75. # else
  76. #  ifdef _MSC_VER
  77. #   define HAVE__FINDFIRST
  78. #   define fortran avoid_fortran_clash    /* obsolete keyword in MSVC++ 5.0 */
  79. #  endif
  80. # endif
  81. #endif
  82.  
  83. #ifdef DJGPP
  84. # define HAVE_DIR_H
  85. # define HAVE_UNISTD_H
  86. # define HAVE_FGETPOS
  87. # define HAVE_FINDFIRST
  88. # define HAVE_TRUNCATE
  89. #endif
  90.  
  91. #if defined(OS2)
  92. # define HAVE_DIRENT_H
  93. # define HAVE_IO_H
  94. # define HAVE_TIME_H
  95. # define HAVE_STDLIB_H
  96. # define HAVE_CLOCK
  97. # define HAVE_CHSIZE
  98. # define HAVE_FGETPOS
  99. # define HAVE_OPENDIR
  100. # define HAVE_STRERROR
  101. #endif
  102.  
  103. #ifdef AMIGA
  104. # define HAVE_STDLIB_H
  105. # define HAVE_SYS_STAT_H
  106. # define HAVE_TIME_H
  107. # define HAVE_CLOCK
  108. # define HAVE_FGETPOS
  109. # define HAVE_STRERROR
  110. #endif
  111.  
  112. #ifdef __vms
  113. # define HAVE_STDLIB_H
  114. # define HAVE_TIME_H
  115. # define HAVE_CLOCK
  116. # define HAVE_FGETPOS
  117. # define HAVE_STRERROR
  118. #endif
  119.  
  120. /*============================================================================
  121. =   Data declarations
  122. ============================================================================*/
  123.  
  124. #undef FALSE
  125. #undef TRUE
  126. typedef enum { FALSE, TRUE } boolean;
  127.  
  128. #if !defined(HAVE_FGETPOS) && !defined(fpos_t)
  129. # define fpos_t long
  130. #endif
  131.  
  132. /*----------------------------------------------------------------------------
  133. -    Possibly missing system prototypes.
  134. ----------------------------------------------------------------------------*/
  135.  
  136. #if defined(NEED_PROTO_REMOVE) && defined(HAVE_REMOVE)
  137. extern int remove __ARGS((const char *));
  138. #endif
  139.  
  140. #if defined(NEED_PROTO_UNLINK) && !defined(HAVE_REMOVE)
  141. extern void *unlink __ARGS((const char *));
  142. #endif
  143.  
  144. #ifdef NEED_PROTO_GETENV
  145. extern char *getenv __ARGS((const char *));
  146. #endif
  147.  
  148. #ifdef NEED_PROTO_STRSTR
  149. extern char *strstr __ARGS((const char *str, const char *substr));
  150. #endif
  151.  
  152. #endif    /* _GENERAL_H */
  153.  
  154. /* vi:set tabstop=8 shiftwidth=4: */
  155.